//
//  BCUserPayPassRequest.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/12/11.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "BCUserPayPassRequest.h"

@implementation BCUserPayPassRequest

- (HttpRequestMethod)requestMethod {
    return PUT;
}
- (NSString *)relativelyUrl {
    return V1_User_Pay_Pass;
}

- (NSString *)pay_pass {
    return [_pay_pass passwordDoubleMd5_32];
}
- (NSString *)confirm_pay_pass {
    return [_confirm_pay_pass passwordDoubleMd5_32];
}

- (BOOL)success:(NSURLSessionDataTask *)task data:(id)obj {
    BOOL success = [super success:task data:obj];
    if (success) {
        BCUserPayPassResponse *resp = [BCUserPayPassResponse yy_modelWithJSON:obj];
        if (self.requestSuccessed) {
            self.requestSuccessed(resp, nil);
        }
    }
    return success;
}

@end
